Not applicable.
A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
1. Field of the Invention
The present invention relates generally to systems for enabling hot insertion and removal of peripheral devices from a computer bus. More particularly the present invention relates to an apparatus and method for implementing a system that allows device drivers to detect device changes occurring during hot docking and hot bay swapping. Still more particularly, the present invention relates to a system that can support hot bay swapping and hot docking for all IDE/ATAPI devices across all operating systems using a structured device driver architecture and reduced complexity Basic Input Output Subsystem (BIOS) firmware.
2. Description of the Prior Art
Many portable computer systems are based on the Intel 80x86 or Pentium series of microprocessors, or another compatible microprocessor, and are controlled by operating system software. In such systems, additional peripheral devices such as hard disk drives, CD-ROM drives, DVD Drives, CD-RW (re-writable) drives, tape backup drives, ZIP drives, LS-120 drives, and so forth are often added and removed by the user.
For example, an extra hard disk may be added to increase storage capacity. Generically referred to as xe2x80x9cPlug and Playxe2x80x9d (PnP), the addition of the hard disk is typically performed by powering-off the computer and inserting the extra hard disk into a bay designed to accept such a device. A bay is an external connector located on the housing of the portable computer that accepts a peripheral device connector. The bay connects to a bus such as an ISA (Industry Standard Architecture), EISA (Extended Industry Standard Architecture), or PCI (Peripheral Component Interconnect) bus linking the device to other components in the system. When the system is subsequently powered-on and xe2x80x9crebootsxe2x80x9d, the presence of the new hard disk device is detected on the bus and the operating system configures itself and the new device for proper operation with one another and application programs. To remove the hard disk, the power is turned-off and the device is removed from the bay. When the operating system subsequently reboots, no configuration for the device takes place due to the absence (i.e., removal) of the device on the bus and the system will not permit communication with the absent device.
During device configuration, the system xe2x80x9cenumeratesxe2x80x9d each device detected on each bus at system start-up. The enumeration process assigns a unique address or number to each device in order to properly access that device. The system also loads device driver software into memory for each device detected, if a driver is not already present. Device drivers provide the required instructions for proper device operation with the operating system and the applications that access the device.
In Plug and Play operating systems as described above, enumeration of new peripheral devices is supported by the operating system with the help of Basic Input Output Subsystem (BIOS) firmware. Peripheral device drivers written for PnP operating systems will not function without this operating system and BIOS support. In some computer systems, BIOS firmware does not include Plug and Play support and therefore a PnP operating system alone will not be able to recognize PnP devices. Under such operating systems, the user must manually disable all unused devices and corresponding IDE/ATAPI controller by manually setting flags in the control software or switches in the hardware.
The limitations of current computer systems and operating system as described above reduce the productivity of computer users. A user using a PnP compatible computer system and peripheral device who wishes to print a document and then fax the document but does not have any bays available for the fax machine must after printing shut down the computer system, remove a peripheral device from one of the bays, insert the fax/modem peripheral device into that bay, reinitialize the computer, call up the document, and proceed to transmit the document using the fax/modem peripheral. This operation is exceedingly inconvenient.
One prior art apparatus and method that overcomes the inherent limitations of Plug and Play systems is the xe2x80x9crequest/acknowledge hot swapxe2x80x9d system. A computer system that supports the request/acknowledge hot swap scheme permits the installation and removal of peripheral devices after system power on and enumeration by the operating system. The computer user informs the operating system prior to performing the device insertion or removal, waits for the operating system acknowledgement that permits the operating system to partially power down the bus, and then performs the insertion or removal. The request/acknowledge scheme prevents corruption of data and protects the electrical integrity of the bus.
Request/acknowledge hot swap systems eliminate many of the disadvantages of Plug and Play systems but still cause user inconvenience due to the inherent delay caused by the request/acknowledge cycle. Another prior art apparatus and method, referred to as xe2x80x9csurprise hot swappingxe2x80x9d eliminates the need for the user to inform the operating system prior to performing the device insertion or removal. This method allows both power and data transfer interconnections between a computer bus and a newly installed device without requiring power to be removed from the bus. For example, computers and peripheral devices which adhere to the Personal Computer Memory Card International Association (PCMCIA) standard permit the hot insertion and hot removal of peripherals into the portable computers PCMCIA bays. The PCMCIA standard is presently in common use with notebook and laptop computers.
Like Plug and Play systems that require BIOS to implement functionality, a surprise hot swap system typically uses Basic Input Output Subsystem (BIOS) subroutines implemented by the computer system designer during system design to accommodate hot insertion and hot removal. BIOS subroutines continuously poll the PCMCIA peripheral bays to detect a peripheral device insertion or removal during system operation. Surprise hot swap systems are limited because the BIOS subroutines for such systems do not support hot insertion or hot removal for a wide array of bus standards such as IDE/ATAPI or PCI. Furthermore, BIOS hot insertion and hot removal systems are operating system dependent in that the operating system must recognize BIOS subroutine calls for hot insertion and removal and support requests for computer system resources from the subroutines. It would be advantageous to be able to surprise hot swap peripheral devices implemented on any bus standard in existing computer systems and across any operating system without having to modify the BIOS firmware and operating system that may be provided by companies other than the computer manufacturer.
For expanded capabilities, portable computers provide the option referred to as xe2x80x9chot dockingxe2x80x9d of coupling the portable computer to a docking station. In such scenarios, a fully operational (i.e., fully booted) portable computer may be inserted or xe2x80x9cdockedxe2x80x9d to the docking station. The docking stations typically include a separate internal bus and associated bus controller and may contain one or more devices (e.g., Network Interface Card (NIC), CD-ROMS, etc.) inserted into device bays on the bus within the docking station.
Upon docking, a powered-up portable computer operating under a Plug and Play compliant operating system will recognize a new bus controller and its associated bus in the docking station and all peripheral devices that are inserted into bays on the new bus in the docking station, but only if the peripheral device is present (i.e., is inserted in a bay) at the time when the powered-up computer is docked with the docking station. For instance, if an operational portable is docked to a docking station containing a bus controller device, an inserted floppy disk drive and an inserted hard disk drive, the PnP compliant operating system will correctly detect and configure the additional bus controller device, as well as the inserted floppy and hard disk drives, even though the power to the portable was not reset and the portable was not restarted. The PnP compliant operating system will correctly enumerate and load device drivers, if necessary, for each device that is present on the newly added bus and will allow the devices to subsequently operate.
The docking station bays may permit xe2x80x9crequest/acknowledge hot swappingxe2x80x9d and xe2x80x9csurprise hot swappingxe2x80x9d identical to the hot swap methods supported for portable computer bays. Both of these hot swapping schemes suffer from various limitations and disadvantages as described above.
Non-PnP operating systems that do not permit xe2x80x9crequest/acknowledge hot swappingxe2x80x9d and xe2x80x9csurprise hot swappingxe2x80x9d contain no mechanism for detecting and configuring docking station bay devices inserted before or after the powered portable performs a hot dock with the docking station.
It would be advantageous to have a computer that permits hot swapping of peripherals and hot docking of portable computers independent of the operating system, Plug and Play, system BIOS and the type of bus architecture. The computer system would preferably implement BIOS firmware of simplified, reduced functionality and complexity and a layered device driver architecture permitting hot swapping and hot docking features without needing operating system support. Preferably, the system should permit six or more IDE or ATAPI type devices to simultaneously be hot plugged into the IDE or ATAPI portable computer bays or docking station bays. Despite these and other readily apparent advantages of such a system, to date no such system is known to exist.
The present invention solves the shortcomings and deficiencies of the prior art by providing a computer system that permits hot docking of a portable computer into a docking station and hot swapping of peripheral devices connected to the portable computer or docking station. In addition, the computer system allows six or more IDE/ATAPI devices to be connected to the computer bus.
The present invention includes a processor executing an operating system. A secondary bridge connects through a PCI bus and a host bridge to a processor. The secondary bridge also connects through the host bridge and AGP bus to a display. CMOS registers and reduced complexity BIOS firmware are also coupled to the secondary bridge. A PCI-to-IDE/ATAPI bridge, also referred to as a peripheral device bridge, connects to the secondary bridge. A number of bays are connected to the IDE/ATAPI bridge and the bridge controls the bays and converts PCI standard signals to IDE/ATAPI. The bays can connect IDE, ATAPI, or FLOPPY devices. Examples of IDE devices are hard disk drive and ZIP removable hard disk drive. Examples of ATAPI devices are Compact Disc Read-Only-Memory (CD-ROM) device, Compact Disc ReWritable (CD-RW) device and Digital Video Disc (DVD) device. Examples of FLOPPY devices are a floppy disk drive and LS-120 drive.
The reduced complexity BIOS firmware has write-only permission to one of the CMOS register and is capable of low level communication with peripheral devices connected to the bays. The computer system also includes a multilevel device driver with read/write access to all CMOS registers, the device driver permitting interfacing and communication between the operating system and the BIOS firmware and peripheral device. The multilevel device driver is hierarchically structured and includes in order of functional closeness to the operating system a file system driver, Vendor Specified Driver (VSD) detection process driver, messaging process driver, bridge device driver, type specific driver, and device specific driver, the device specific driver functionally closest to the computer system hardware. A process in the computer system includes a memory address space, a software program that executes within that address space and system resources required by the software program to execute.
The processor executes the VSD detection process driver continuously within the computer system. The detection process driver informs the bridge device driver when a peripheral device is inserted or removed from one of the bays. The bridge also identifies the bay into which the peripheral device was inserted or removed. If a device is inserted into a bay, the bridge device driver identifies the peripheral device, writes the identity to CMOS registers, and calls a device specific driver for the device to permit communication between the device and the operating system. The portable computer system permits hot swapping of peripheral devices independently of the operating system. Thus, any suitable operating system such as Microsoft Windows 3.0(trademark), Microsoft Windows 3.1(trademark), Microsoft Windows 95(trademark), Microsoft Windows 98(trademark), Microsoft Windows NT(trademark), Microsoft Windows 2000(trademark), DOS(trademark), UNIX(trademark), along with its flavors LINUX(trademark), Red Hat UNIX(trademark) and UNIX(trademark) equivalent vendor specific operating system (HPUX(trademark), IBM AIX(trademark), etc . . . ), MVS(trademark), and VMS(trademark) will allow hot swapping.
The portable computer system can connect to a docking station through a PCI bus docking connector. The docking station includes a number of bays controlled by a second IDE/ATAPI bridge device in the docking station. As the processor executes the detection process driver in the portable computer, the detection process driver identifies any devices present in the docking station after the portable computer docks with the docking station. The detection process driver can also recognize any IDE/ATAPI/FLOPPY devices that are inserted or removed into a bay of the docking station even if the devices are inserted after docking. After detecting insertion or removal of a peripheral device, the detection process driver informs the bridge device driver of the insertion or removal and the identity of the bay. The device driver identifies the peripheral device, writes the identity to a CMOS register, and calls a type specific driver and device specific driver for the device to permit communication between the device and a operating system executing on the portable computer CPU.
To recognize hardware changes in a powered computer system for the present invention involves generating a SMI interrupt when a peripheral device is inserted or removed into a bay. Next, a detection process driver determines whether the peripheral device was inserted or removed and the bay location of the device. The processor executes a IDE/ATAPI bridge device driver if the SMI interrupt is caused by the insertion of a peripheral device. The bridge device driver identifies the peripheral device and configures it for optimal performance. The bridge device driver also writes the identity of the peripheral device to a CMOS register, resets the SMI interrupt, and calls a device specific driver for the peripheral device to permit communication between the device and the operating system. If the SMI interrupt is caused by the removal of a peripheral device to which data has not been saved, the SMI handler and a messaging process inform the user of the unsaved data condition.
The BIOS firmware routines for handling a System Management Interrupt (SMI) for the present invention caused by hot docking or hot bay swapping involves determining if the interrupt is caused by a bay insertion or removal event. BIOS routines then determine which bay has changed status. The BIOS turn on power to the particular bay for an insertion event and turns off power for a removal event. Next, BIOS routines confirm that an IDE/ATAPI/FLOPPY device is being inserted or removed and then call low level read/write communication primitives to verify communication. A BIOS function initializes the bay in which the insertion or removal event occurred. The BIOS initialization routines also update a CMOS register to indicate that the swap or dock event occurred. Finally, a BIOS beep routine sounds three beeps to inform a user of a swap or dock event occurrence.